﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace LocalizedSample
{
    public static class LocalizationExtension
    {
        public static T Locale<T>(this ICollection<T> collection, int lcid) where T : Localization {
            return collection.Where(m => m.LCID == lcid).FirstOrDefault();
        }
    }

    //public class Localize<T, TL>
    //{
    //    T value;
    //    public Localize() { }
    //    public Localize(T value)
    //    {
    //        if (value is ILocalizable<T, TL>)
    //        {

    //        }
    //        //this.Parent = value;
    //    }
    //    public static implicit operator T(Localize<T, TL> me)  // explicit byte to digit conversion operator
    //    {
    //        return me.value;
    //    }

    //    public static implicit operator Localize<T, L>(T value)
    //    {
    //        return new Localize<T>(value);
    //    }
    //}
}
